package com.weiyuwqj.api.model.vo;

import java.io.Serializable;

import com.weiyuwqj.api.exception.CrowdException;
import com.weiyuwqj.api.model.SysAssetDeposit;

/**
 * 
 * @className:SysAssetDepositVo	
 * @Description: 资产方押金vo
 * @author cx
 * @date:2017年3月28日下午8:57:43 
 *
 */
public class SysAssetDepositVo extends SysAssetDeposit implements Serializable{

	private static final long serialVersionUID = -9007029430699188718L;
	
	/**
	 * 产品方名
	 */
	private String companyName;
	
	
	public void validData(){
		if(this.getCompanyId()==null||this.getCompanyId()<=0){
			throw new CrowdException("sys.asset.company.id.not_exists");
		}
		if(this.getDeposit()<=0){
			throw new CrowdException("sys.asset.deposit.lt.zero");
		}
		if(this.getRate()<=0||this.getRate()>1){
			throw new CrowdException("sys.asset.rate.between.zero.one");
		}
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
}
